package com.smh.demo1.a10.jdk;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author shiminghui
 * @date 2025/4/12 17:45
 * @description: TODO
 */
public class JDKProxyDemo {
    private final static Logger log = LoggerFactory.getLogger(JDKProxyDemo.class);

    public static void main(String[] args) {

        new $Proxy1(new InvocationHandler() {
            @Override
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

                return null;
            }
        }).test();


    }


    interface Inter {
        public void test();

        public String test2();
    }

    static class Target implements Inter {

        @Override
        public void test() {
            log.info("target test");
        }

        @Override
        public String test2() {
            log.info("target test2");
            return "test";
        }
    }

}
